// $Id: main.c 29 2015-03-11 03:49:12Z robim.poa@gmail.com $
//-----------------------------------------------------------------------------
// Purpose: Yag scripts reading
// $Rev: 29 $
// $Author: robim.poa@gmail.com $
// $Date: 2015-03-11 03:49:12 +0000 (Wed, 11 Mar 2015) $

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include "debug.h"
#include "expression.h"
#include "ast.h"
#include "text_decoding.h"
#include "text_processing.h"
#include "ast_bodybuilder.h"

int main()
{
	FILE *pfile;

	struct node_ast *node_ast_root;
	struct tp_node_var *nodep_var_head = (struct tp_node_var*) malloc(sizeof(struct tp_node_var));
	nodep_var_head->next = NULL;

	pfile = fopen("teste.c","rb");
	if(pfile == NULL)
	{
		printf("O arquivo não foi lido.\n");
		return 0;
	}

	node_ast_root = Scan(pfile, nodep_var_head);

	fclose(pfile);

	#ifdef DEBUG
		PrintVars(nodep_var_head);
		astPrint(node_ast_root);
	#endif

	return 0;
}